home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / sw_41.zip / SW-41.DOC < prev    next >
Text File  |  1991-12-01  |  32KB  |  810 lines

  1.  
  2.  
  3.                                   SW.EXE 4.1
  4.                                  Warren Small
  5.                                    (c) 1991
  6.  
  7.      This batch file utility will display up to 5 lines of "text"  in a window
  8. using its command  line format  or up  to 20 lines  using an external  'Screen
  9. Definition' file. With either  method, the color  of each line can be  defined
  10. separately or  as a  group. Also, the colors  for the window, its  border, the
  11. screen  background and  its border  can  be  specified. Five  different window
  12. borders are possible and the screen background can be filled with characters.
  13.  
  14.      This utility also provides functions for  retrieving input from the user,
  15. controlling batch file execution through branching  and alerting the user with
  16. various sounds.
  17.  
  18. Command line syntax:
  19.  
  20.        SW [options] "text1" [options] ["text2"] [options] ["text3"] ...
  21.  
  22. External file syntax:
  23.  
  24.                              SW @filename [label]
  25.  
  26.      One advantage of using the external file approach  is that more than  one
  27. window can be displayed  with only one call to  SW! The screen  definition can
  28. also be written into  the batch file that  utilizes it so that  disk space  is
  29. used  optimally.  The optional  label shown  above is  used to  mark different
  30. definitions within the same file. The  demo batch file, SW41DEMO.BAT, contains
  31. many examples of both methods. See page 10 for more information.
  32.  
  33.                                    OPTIONS
  34.  Window:  /f# Foreground (0-15)  /b# Background (0-7)  /l# Border (0-5)
  35.           /s# Shadow (1-4)  /w Wide Edge  /2 Double Spacing  /0 No Margin
  36.           /r# Row (1-25)  /c# Col (1-80)  /h# here + #  /d Draw  /z Zoom
  37.  Text:    /t|g# Text (0-15)  /e# Enhanced Text  /m# Border Msg  /j# Justify
  38.  Screen:  /k#[ ] Clear screen with color (0-7) [char]  /o# Outside edge
  39.  Other:   /p#[-] Pause  /a# Alert (0-9) /q... Query
  40.           /i#[var] User Input  /n# Input Line  /u Uppercase
  41.  
  42.      Switches can be in almost any order, upper or lower case, and  a space is
  43. required between each.
  44.  
  45.      A second utility, DI.EXE,  is provided with SW to allow various checks on
  46. your disk  drives. DI  will eliminate those  annoying DOS error  messages that
  47. can  mess up your beautiful SW screens from time to time.  See Page 13 for the
  48. details.
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.                                     Page 1
  60.  
  61.                                   SW.EXE 4.1
  62.                                  Warren Small
  63.                                    (c) 1991
  64.  
  65.                               WINDOW APPEARANCE
  66.  
  67. /F#  Foreground and background colors  for the window  are set by the /f#  and
  68. /B#  /b# switches. The  color can be selected using  the numbers or names.  If
  69.      your command line gets to be longer than  128 characters, use the numbers
  70.      to gain some space.  DOS will ignore anything  past the 128th position on
  71.      the command line.
  72.  
  73.                                  COLOR VALUES
  74.  
  75.                0 or bla = Black      8 or BLA = Grey          
  76.                1 or blu = Blue       9 or BLU = Bright Blue   
  77.                2 or gre = Green     10 or GRE = Bright Green  
  78.                3 or cya = Cyan      11 or CYA = Bright Cyan   
  79.                4 or red = Red       12 or RED = Bright Red    
  80.                5 or mag = Magenta   13 or MAG = Bright Magenta
  81.                6 or yel = Brown     14 or YEL = Yellow        
  82.                7 or whi = White     15 or WHI = Bright White  
  83.  
  84. /L#  Window border type is defined by the /l# (line) switch.
  85.  
  86.                /l0 - none     /l1 - ┌─       /l2 - ╔═
  87.                /l3 - ╒═       /l4 - ╓─       /l5 - █▀
  88.  
  89.      If a  character is  used instead  of a  number, it  will be  used as  the
  90.      window border. (e.g. /l* or /l▓).
  91.  
  92. /S#  A shadow  can be added  with the  /s# option. If the  shadow covers other
  93.      characters on the screen they will be darkened, rather than hidden.
  94.  
  95.                /s1 - right, below (default if /s is used alone)
  96.                /s2 - left, below
  97.                /s3 - right, above
  98.                /s4 - left, above. 
  99.  
  100. /W   The /w switch will give your window a wide edge, making it  2 rows taller
  101.      and  4 columns wider.  Using this option  will reduce  the maximum string
  102.      length to 64  and the maximum number  of lines from 20  to 18 if  you are
  103.      using a screen definition. The /w switch will  have no effect on a window
  104.      with no border (/l0).
  105.  
  106. /2   The /2 option will add  a blank line between each  text line passed.  The
  107. /0   /0 switch removes the  blank space between the border and first and  last
  108.      lines of text. Combine  /0 with the /l0  switch and the  resulting window
  109.      will be only as large as needed for the text passed.
  110.  
  111. /R#  The position of the window  can be set using the /r# (row) and /c#  (col-
  112. /C#  umn)  switches. These  are referenced  to the  upper  left corner  of the
  113.      window.  If the  window is  too big  to fit,  these coordinates  will  be
  114.      adjusted by the program. Thus if you have a line that places  a window in
  115.      the  lower right hand corner and  you want to add a shadow, just put a /s
  116.  
  117.                                     Page 2
  118.  
  119.                                   SW.EXE 4.1
  120.                                  Warren Small
  121.                                    (c) 1991
  122.  
  123.      on  the end  of  the line  and the  window  will be  positioned  properly
  124.      without changing the row and column switch values.
  125.  
  126.      If you wish to set the  size of the window yourself, a second /r# and /c#
  127.      will define the bottom  row and right  column. If  the text passed to  SW
  128.      will  not fit  in  the  window, these  settings  will be  adjusted by  SW
  129.      automatically,  adjusting the bottom  and right  sides first.  If you set
  130.      only top  and bottom  or left  and right,  SW will  calculate the  proper
  131.      values for you.
  132.  
  133. /H#  For simpler  positioning, /h# (here)  will set the  row according to  the
  134.      present cursor  position adding  # to  it if  provided. The value  can be
  135.      plus  or minus.  Use the  /h# switch  when you're  trying to  mix  screen
  136.      output from another program with an SW window.  The window can be  easily
  137.      placed relative  to the  other text  and will  be centered left  to right
  138.      unless you use the /c# switch.
  139.  
  140. /D   When a Pause, Query  or User Input  is utilized, the window will  "popup"
  141.      on the  screen and  disappear when the  pause finishes or  the input  has
  142.      been processed. If you  want the window to be left on the screen, specify
  143.      the /d  switch. This  will draw  the window  instead. See below  for more
  144.      information on Pause, Query and User Input.
  145.  
  146.      ┌───────────────────────────────────────────────────────────────────────┐
  147.      │ NOTE TO PREVIOUS  USERS - Since  Pause, Query and User  Input windows │
  148.      │ now disappear  when the function is completed, you may wish to change │
  149.      │ your batch files by adding the /D switch.                             │
  150.      └───────────────────────────────────────────────────────────────────────┘
  151.  
  152. /Z   A special effect for SW 4.1 is Zoom Window. Sometimes called  "exploding"
  153.      by other applications, this  switch will cause the window to be drawn  in
  154.      several steps, from small  to its final size.  The shadow and  border are
  155.      zoomed as well with the text added when the proper size is reached.
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.                                     Page 3
  173.  
  174.                                   SW.EXE 4.1
  175.                                  Warren Small
  176.                                    (c) 1991
  177.  
  178.                                TEXT APPEARANCE
  179.  
  180. /T#  Text color can be controlled with the /t# and /g#  switches. Both use the
  181. /G#  same color table  shown above and both  are position sensitive.  /g# will
  182.      change the text color for all text following  the switch. /t# will effect
  183.      only the text  string immediately after the  switch. New in version  4.0,
  184.      multiple /g#  switches could be used  to color groups  of lines. To  make
  185.      "text" blink, add  128 to the color  # or put a  + after the  color name.
  186.      (e.g. 4  for red  plus 128 =  132 for blinking  red or red+).  The window
  187.      foreground color can also blink if desired.
  188.  
  189. /E#  This  switch selects  the "enhanced" text  color. This is  the color used
  190.      when  you want  to highlight  a character  within a  line. In  the  Query
  191.      example  below the  '~' character  preceding the  'Y' and  'N' will cause
  192.      these characters to appear  bright red (/eRED) while the rest of the text
  193.      is the default bright  white. If the e parameter is omitted, SW.EXE  will
  194.      use the color of the current line with  the opposite intensity. There  is
  195.      no limit  to the  number of  characters that  can be highlighted  on each
  196.      line.
  197.  
  198. /M#  A /m# preceding a  text string marks the string  as a Border  Message. If
  199.      it is the first string in  the window, it  will appear at the top. If  it
  200.      appears after the first line of regular text,  the message will appear at
  201.      the bottom.  The # must be  'l', 'r'  or 'c' for left,  right and center.
  202.      Center is the default if /m is used alone. The  message color will be the
  203.      same as the border.
  204.  
  205. /J#  Text  can be  justified (aligned)  to the  left or  right as  well as the
  206.      default  centering.  This  switch  works  on all  strings  following  its
  207.      position, just  like /g#. /jl  will align text left and  /jr will line up
  208.      the text to the right. /jc would restore the default.
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.                                     Page 4
  231.  
  232.                                   SW.EXE 4.1
  233.                                  Warren Small
  234.                                    (c) 1991
  235.  
  236.                               SCREEN APPEARANCE
  237.  
  238. /K#  The /k# switch  will clear the screen  using the color  # and  places the
  239.      cursor at the  upper left corner. A single  character can be added  after
  240.      the #  to give some texture  to the screen. (e.g.   /k7─ or /kwhi─)  This
  241.      can make the shadow effect more interesting. 
  242.  
  243.      A second  /k# switch  on the  same line  can be  used to  set the  screen
  244.      foreground color. The screen background color  is limited to the  first 8
  245.      but the screen foreground color can  use all 16. SW /kblu  /kWHI sets the
  246.      screen color to bright  white on blue. This  will NOT affect  the current
  247.      DOS screen color.
  248.  
  249.      Instead of a simple fill character for the  background, a string could be
  250.      used in the form /k#string.  The string can be up  to 80 characters long.
  251.      Interesting patterns will  result depending  on the length. Lengths  like
  252.      2, 4, 5, 8, 10, etc.  divide into 80 evenly. Other  values result in each
  253.      line being offset from  the last. Don't limit yourself to just words. Use
  254.      some of  the special IBM characters  in different  combinations. The Demo
  255.      batch file  has three  examples. If  you want  spaces within  the string,
  256.      either surround the string with quotes  or substitute the underscore  (_)
  257.      for each space. They will be replaced by spaces before being displayed.
  258.  
  259. /O#  The  /o# switch will  set the  screen border color. All  color values are
  260.      valid. Using the switch without a color will reset the border to  normal.
  261.      This switch could  be used alone  to set  or reset  the border. SW  /ored
  262.      will  set the  screen  border to  red. Some  programs  ignore  the border
  263.      color, others reset it and  still others set  one of their own. You  will
  264.      have to experiment on your own is you wish to set a  special border color
  265.      for a program.
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.                                     Page 5
  289.  
  290.                                   SW.EXE 4.1
  291.                                  Warren Small
  292.                                    (c) 1991
  293.  
  294.                                 OTHER SWITCHES
  295.  
  296. /P#  The /p#  switch will pause for # 10ths of a  second before proceeding. If
  297.      # = 0 or  is missing the program will wait  for the user to press a  key.
  298.      If you combine  Query and Pause,  the pause  will occur  after the  query
  299.      unless the query specifies  a default (See below). Adding a '-' after the
  300.      number will allow the user to interrupt the timer. e.g. /p50- will  pause
  301.      for 5 seconds or less if the user presses a key. Maximum  value for pause
  302.      is 300 or 30 seconds.
  303.  
  304. /Q   The Query  switch (/q...)  allows user  input of  single characters.  The
  305.      selected key  sets the  DOS Errorlevel  allowing conditional  branches in
  306.      your batch file. 
  307.  
  308. Example:       sw /eRED "Continue?" "~Yes  ~No" /qyn
  309.                if errorlevel 2 goto exit
  310.                if errorlevel 1 goto next
  311.  
  312.      This will  wait for the user  to press the 'y'  or 'n' key rejecting  all
  313.      other keystrokes with a 'beep'. If 'n' is  pressed, Errorlevel 2 will  be
  314.      set  and the batch file will branch to the  label ":exit". 'y' will cause
  315.      a branch to ":next".
  316.  
  317.      If the '~' (tilde)  character immediately follows the  /q, the ESC key is
  318.      also available and will set Errorlevel 0 if pressed. Up to 70  characters
  319.      can be  designated as option keys.  If you wish to  use the space bar  or
  320.      the  piping (|)  and redirection  (< or  >) characters,  enclose  all the
  321.      characters in  quotes. (e.g. /q"abc "). This  feature is not  case-sensi-
  322.      tive.
  323.  
  324.      SW 4.0  added the  '`' character  to indicate  a default  choice for  the
  325.      Query.
  326.  
  327. Example:       sw /eRED "Continue?" "~Yes  ~No" /q`yn
  328.  
  329.      This makes a  'Y' the default.  SW will  return Errorlevel 1 if  ENTER is
  330.      pressed.  Also,  by combining  a pause  with  a  default choice,  SW will
  331.      return the default if no key is pressed before the pause time elapses.
  332.  
  333.      An asterisk (*)  used in the Query string  acts like a wild card  choice.
  334.      SW  will  return an  Errorlevel  corresponding  to  its  position in  the
  335.      string.
  336.  
  337. Example:  sw /eRED "Press ~Y to Continue" "Any other key to abort" /qy*
  338.  
  339.      'Y'  returns Errorlevel  1 and  all other  keys return  2. ESC  and/or  a
  340.      default response  could be  combined with  the wildcard  option as  well.
  341.      Pressing ENTER would  then return  the default  choice as  would a  Pause
  342.      timeout.
  343.  
  344.  
  345.  
  346.                                     Page 6
  347.  
  348.                                   SW.EXE 4.1
  349.                                  Warren Small
  350.                                    (c) 1991
  351.  
  352. /I#  The /i#  switch will add  an edit line  to the window  which will  accept
  353.      User Input.  The # defines  the length  of the line. This  feature can be
  354.      used  to ask  for directory  names,  file names,  drive letters  or other
  355.      information which  can then  be used by the  batch file. SW will  put the
  356.      answer in the batch file's environment with the  label ANS. You can  then
  357.      use the ANS variable in  your batch file. A Pause used with this  feature
  358.      will occur after the input.
  359.  
  360. Example:            sw "Which Directory?" /i40
  361.                     if exist %ans%\nul cd %ans%
  362.  
  363.      This  does  has some  limitations  since it  is  difficult to  check  the
  364.      validity of the answer from a batch file.
  365.  
  366.      ┌───────────────────────────────────────────────────────────────────────┐
  367.      │ NOTE TO SW 3.8 USERS:  If you have used the /i# switch  in your batch │
  368.      │ files,  be  sure to  remove  the line  "CALL  SW-ENV.BAT" since  this │
  369.      │ version does not create  the batch file in favor of  direct manipula- │
  370.      │ tion of the environment.                                              │
  371.      └───────────────────────────────────────────────────────────────────────┘
  372.  
  373.      Optionally, with  SW 4.1, you can  specify your  own environment variable
  374.      name with the /i# switch. The variable is indicated by a string, up to  8
  375.      characters long, placed  after the number.  e.g. /i24Dir gives  you a  24
  376.      character field  and places the answer  in the  environment variable DIR.
  377.      (All environment  variables are shifted to  upper case.)  This allows you
  378.      to get more than  one string before  processing. Just be sure your  envi-
  379.      ronment is sized properly. Check the SHELL command in your DOS manual.
  380.  
  381.      The string  input routine  has been  enhanced in  SW 4.1 with  INSert and
  382.      Overtype modes, improved cursor positioning (HOME,  END), and use of  the
  383.      ESCape  key for  aborting. You  can detect  ESC  if  the answer  does not
  384.      appear in the environment.
  385.  
  386. /N#  By default, the User Input field  is placed on the last  line of the box.
  387.      By  using the /n#  switch, the field can  be placed on any  line. If # is
  388.      positive, the  field will  appear after  the string on  line #.  If #  is
  389.      negative, the field will appear by itself on line #.
  390.  
  391. /U   In some cases, you may want only uppercase characters in the answer.  Use
  392.      the /u  switch to  do this. This  can be useful  when asking for  a drive
  393.      letter and want to put the results on the screen for verification.
  394.  
  395.  
  396. /D   Pause,  Query and User Input windows "popup" on the screen. See page 3 in
  397.      the Window Appearance section for a description of this switch.
  398.  
  399.  
  400.  
  401.                                     Page 7
  402.  
  403.                                   SW.EXE 4.1
  404.                                  Warren Small
  405.                                    (c) 1991
  406.  
  407. /A#  The Alert switch (/a#) was enhanced for SW 4.0. The normal IBM beep  will
  408.      be used  if # is 0 or  missing. Nine other sounds can be produced varying
  409.      from simple tones to more complex sounds using the values below. 
  410.  
  411.                              Alert Switch Values
  412.                       1 - Low Freq Tone    5 - Bweep Two
  413.                       2 - Mid Freq Tone    6 - Bomb     
  414.                       3 - High Freq Tone   7 - Siren    
  415.                       4 - Bweep One        8 - Phasor   
  416.                                  9 - Tweeter
  417.  
  418. The demo batch file gives you a chance to try them all.
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                     Page 8
  460.  
  461.                                   SW.EXE 4.1
  462.                                  Warren Small
  463.                                    (c) 1991
  464.  
  465.                                    DEFAULTS
  466.  
  467.      Yellow  double line border on  a centered blue  window with white single-
  468. spaced text. No Clear Screen, Shadow or Zoom.  (/fYEL /bblu /gWHI /l2)
  469.  
  470. Example:  sw /kwhi /fblu /bred /gYEL "Line 1" /tWHI "Line 2" "Line 3" /s2
  471.  
  472.      This  will display a blue (/fblu) on red (/bred)  window with a shadow to
  473. the left  and below it (/s2). The  screen color will be white (/kwhi). Lines 1
  474. and  3 are bright yellow (/gYEL)  and line 2  is bright white (/tWHI). See the
  475. batch file SW41DEMO.BAT for many more examples.
  476.  
  477.      If  no text  strings  are passed,  features such  as Clear  Screen (/k#),
  478. Query (/q...), Pause (/p#),  Alert (/a#), and Outside  Edge (/o#) can  be used
  479. with no window output. (e.g. sw /p10 will pause for 1 second.)
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.                                     Page 9
  518.  
  519.                                   SW.EXE 4.1
  520.                                  Warren Small
  521.                                    (c) 1991
  522.  
  523.                               SCREEN DEFINITIONS
  524.  
  525.      When you run SW41DEMO.BAT,  you can easily see  the advantages of using a
  526. screen  definition  when you  want  more  information  displayed.  All of  the
  527. switches  just described  are applicable  in  a screen  definition,  including
  528. Query, Pause, and User input.  The thing to remember is that the windows  will
  529. be displayed in  the order that  they are  read from the  file. If you have  a
  530. pause with  the third window then  the pause will  take place  after the third
  531. window is displayed. Then the rest of the windows will be displayed.
  532.  
  533.      The are three  definitions in the  demo batch file  as well  as a  fourth
  534. stored  in  the separate  file SW-41.NEW.  The first  uses the  default labels
  535. 'Display' and 'End_Display'.
  536.  
  537.                :Display
  538.                _window /kcya┼ /r2 /s /bred /w /0
  539.                SW.EXE - Expanded Text Handling!
  540.                /tWHI+ Multiple Windows!
  541.                /m  v 4.0 
  542.                _window /r10 /s /bwhi /gblu /l1 /fred /0
  543.                /tBLU Optional Command Line Syntax:
  544.                SW @filename [label]
  545.                _window /r16 /s /bwhi /gblu /l1 /fred /0 
  546.                /tBLU SW 4.0 ADDITIONAL FEATURES
  547.                /tred ───────────────────────────────────────────────────
  548.                /jl - Define the entire screen with multiple windows   
  549.                  using external text files.
  550.                _window /r25 /l0 /0 /p100-
  551.                - Press any key for more -
  552.                _window /r19 /bwhi /gblu /l0 /jl /0 /p100-
  553.                - Text handling can be expanded to 20 single-spaced
  554.                  lines per window.
  555.                _window /r19 /bwhi /gblu /l0 /jl /0 /p100-
  556.                - Using labels, more than one definition can be    
  557.                  included in the same file.
  558.                _window /r19 /bwhi /gblu /l0 /jl /0
  559.                - The screen definition can be included inside the 
  560.                  calling batch file!
  561.                _window /r25 /l0 /0 /p200-
  562.                - Press any key to continue -
  563.                :end_display
  564.  
  565.      The  appearance of  each  window is  defined  on  a  line beginning  with
  566. '_window' and followed by  a space. The  switches have  the same form as  they
  567. would on  a command line, preceded  by a  slash and separated by  a space. The
  568. lines  that follow  will  be interpreted  as text  until another  '_window' is
  569. found or the 'end_display' label. 
  570.  
  571.      The text switches can appear on  the same line preceding the text. The /t
  572. switch is used to change the color one line of text  and is separated from the
  573. text by a space. /g  can be used before a text line to change the color of the
  574.  
  575.                                    Page 10
  576.  
  577.                                   SW.EXE 4.1
  578.                                  Warren Small
  579.                                    (c) 1991
  580.  
  581. rest of the lines. /j can be used  to change the text alignment and /m is used
  582. to specify  a border  message. This  example has  4 pauses  and defines  small
  583. windows that fit inside  larger ones to change  the text without redrawing the
  584. whole window.
  585.  
  586.      The second  definition is  an example  of a  simple menu,  in this  case,
  587. demonstrating  the sounds  that can  be generated  with SW  4.1. It  uses  the
  588. labels ':menu' and ':end_menu' to differentiate it from the other two. 
  589.  
  590.                :menu
  591.                _window /eRED /r12 /s /l1 /w
  592.                /mc ┤ Play a Sound ├
  593.                ~Low Tone   ~Mid Tone   ~High Tone
  594.                Bweep ~1    Bweep ~2    ~Bomb     
  595.                ~Siren      ~Phasor     ~Tweeter  
  596.                ~E~S~C
  597.                :end_menu
  598.  
  599.      The last definition uses  the labels, '4.1' and 'end_4.1', and contains 9
  600. windows. This  is probably an  extreme case but  it demonstrates  the power of
  601. using  the definition  file to  display  multiple  windows. Users  of previous
  602. versions  of SW  will recognize  this screen  as a conversion  of the  final 8
  603. calls to  SW in  their demo batch  files. It's faster  this way, isn't  it! Of
  604. course, disk cache users will not see as much difference as those without.
  605.  
  606.                :4.1
  607.                _window /kwhi░▒▓ /r2 /s /bred
  608.                SW.EXE - No More Echoes!
  609.                _window /tRED /r11 /fWHI /s 
  610.                They can also be placed anywhere on the screen they'll fit!
  611.                _window /c1 /r1 /tCYA /fBLU /bcya /l1 /0 /s1
  612.                Upper Left
  613.                _window /c71 /r1 /tMAG /fGRE /bmag /l1 /0 /s2
  614.                Upper Right
  615.                _window /c71 /r23 /tblu /fBLA /bgre /l1 /0 /s4
  616.                Lower Right
  617.                _window /c1 /r23 /tcya /fMAG /byel /l1 /0 /s3
  618.                Lower Left
  619.                _window /r19 /fWHI /tYEL+ /b4 /l5
  620.                 (c) 1991   Warren Small
  621.                _window /r25 /l0 /0 /p100-
  622.                 - Pausing 10 seconds -
  623.                _window /r25 /l0 /0
  624.                 -      or less!      -
  625.                :end_4.1
  626.  
  627.      You will  notice the /k switch  on the window  line has  no quotes around
  628. the  fill string. This was necessary  because of the way the line is processed
  629. when using  the screen definition. As  before, if you  need spaces within  the
  630. string, use the underscore (_) character. It will be replaced with a space.
  631.  
  632.  
  633.                                    Page 11
  634.  
  635.                                   SW.EXE 4.1
  636.                                  Warren Small
  637.                                    (c) 1991
  638.  
  639.                                TIPS AND TRICKS
  640.  
  641.      - Change the contents  of a window without redrawing the whole thing. Use
  642. the /l0 and /0 switches to  create a window  just big enough for the text  and
  643. without a border. This way  you can overwrite part or all  of the inside  of a
  644. window and change the text in a flash. The first screen definition above  uses
  645. this technique.
  646.  
  647.      - Use the ECHO  batch file command  to create screen definitions 'on  the
  648. fly'. That's right. If you use  the redirect character > and the redirect with
  649. append >> you can build a screen definition while running the batch file. 
  650.  
  651.      Perhaps you have asked the user three questions and wish to confirm  them
  652. before proceeding.  If you  use  the  command line  approach to  generate  the
  653. window, you can substitute the variable names  directly (SW "Drive %DR%"  ...)
  654. but this isn't possible with a  text file read from the disk since SW is doing
  655. the processing, not DOS. Use the ECHO command like this:
  656.  
  657.      ECHO :Display > answer.txt
  658.      ECHO _window /s /kRED▒ /l5 /qyn>> answer.txt
  659.      ECHO /mc "SW Input">> answer.txt
  660.      ECHO "Install @ Drive %DR%%Dir%?">> answer.txt
  661.      ECHO "~Yes   ~No">> answer.txt
  662.      ECHO "End_Display">> answer.txt
  663.  
  664. The first line  creates the file 'answer.txt'  and the following  lines append
  665. to  it. Then  you call  SW @answer.txt.  Please  note that  the >>  is  placed
  666. directly after the end quote so  there won't be a space  after it in the file.
  667. This  will cause SW to display the  end quote in the window  which is probably
  668. not desirable.
  669.  
  670.      - You could also use the above method  to display other programs'  output
  671. in  an SW window. The text  can be no longer than 70 characters should be less
  672. than 20  lines. If more lines  are found they  are ignored.  Just redirect the
  673. program output to  the file.  e.g. dir c:\temp\*.exe  >> answer.txt. This  way
  674. you can show  the result of  an operation  without destroying the look  of the
  675. screen. Check near the end of SW41DEMO.BAT for an example.
  676.  
  677.      - Use  the Enhanced  text color  attribute (/e#)  to display text  in two
  678. colors on the same line. You could make whole words stand out in this manner.
  679.  
  680.                     SW /tRED /eRED+ "~B~l~i~n~k~i~n~g Red"
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.                                    Page 12
  692.  
  693.                                   SW.EXE 4.1
  694.                                  Warren Small
  695.                                    (c) 1991
  696.  
  697.                             DI - Disk Information
  698.  
  699.      A new addition to  the SW package  is the companion program DI.EXE.  This
  700. little utility will  be indispensable for those  batch files that  require the
  701. use  of disk drive. If you've ever had your nice SW  screen messed up with DOS
  702. error messages, you'll love DI!
  703.  
  704.      The program puts all  the little disk checking  functions in one  easy to
  705. use package.  With it  you can check  the validity of  a Drive input  from the
  706. user, drive status, and disk status.  You can even access the  Volume label on
  707. a disk to verify that  the user has put the proper  disk in the  drive. Volume
  708. labels can be  changed too.  You can even make  sure there's enough space  for
  709. copying files or check the PATH for a file.
  710.  
  711.            SYNTAX: DI [drive:] /switch [label || filespec || size]
  712.  
  713.      The first  parameter indicates  the drive on  which the  operation is  to
  714. take place. If it is left out, the default drive will be used.
  715.  
  716.      /VALID - Check drive to verify its existence.
  717.      /READY - Check drive to see if a disk is present.
  718.      /WRITE - Check disk write-protect status.
  719.      /SPACE - Check disk for available space.
  720.      /EXIST - Check PATH for a file.
  721.      /MATCH_VOL - Check for proper Volume ID.
  722.      /NEW_VOL - Change Volume ID.
  723.      /DEL_VOL - Delete Volume ID.
  724.  
  725.      The  third  parameter  is used  with  the /SPACE,  /EXIST  and Volume  ID
  726. switches. Use a /D as the last parameter to display the Errorlevel returned.
  727.  
  728.      Two methods can be used to check available  space. You can either provide
  729. a filespec such as  c:\temp\*.exe or the  number of KBytes in the  form /1024.
  730. If a  filespec is  provided, DI  will count  the number a  bytes in  the files
  731. matching it and then check the drive for available space.
  732.  
  733.      /EXIST  expands the batch  file function  'if exist'.  This function will
  734. search the PATH for the filename specified in  the  next parameter. This  will
  735. be  useful if your  batch file  needs to  know the  capabilities of  a strange
  736. machine.  The drive parameter is not used.
  737.  
  738.      For the Volume ID functions, /MATCH_VOL and NEW_VOL, the third  parameter
  739. is  the  label  to match  or  the new  label  respectively. No  label  name is
  740. required for /DEL_VOL.
  741.  
  742.      Each  of  these functions  returns  Errorlevel  0  if  the operation  was
  743. successful  and Errorlevel  1 if  not. There  is  no  screen output  from this
  744. utility  except when using /D  or  passing bad a parameter.  A  short descrip-
  745. tion of the program and the switches is displayed the latter case. If you pass 
  746. a bad parameter, DI will return Errorlevel 255.
  747.  
  748.  
  749.                                    Page 13
  750.  
  751.                                   SW.EXE 4.1
  752.                                  Warren Small
  753.                                    (c) 1991
  754.  
  755.      These  programs  are  "shareware". If  you  find  them to  be  useful,  a
  756. donation of  $15  would  be appreciated.  This will  entitle  you to  personal
  757. notification of  future versions  and give  your suggestions  for enhancements
  758. more value. Registered 3.X users can upgrade to Version 4.1  for $5. This is a
  759. free upgrade for 4.0 users. Site licenses can be negotiated.
  760.  
  761. SW Ver. 4.1 
  762. DI Ver. 1.0  December 1, 1991  
  763.  
  764. Warren Small
  765. 35 Benjamin Street
  766. Manchester, NH  03109
  767.  
  768. CIS  71076,407
  769. GEnie  W.SMALL
  770. Prodigy  RSJW31A
  771.  
  772.  
  773. SW.EXE History
  774.  
  775.      3.6 - 12/31/89 First general release.
  776.  
  777.      3.7  - 02/01/90 Increased text lines to 5. Colors can be specified with 3
  778. letter codes. Added Here (/h#), Double Spacing (/2), No Margin (/0),  Enhanced 
  779. text color (/e#). 
  780.  
  781.      3.8  - 04/22/91 Added 3  border styles, 3  shadow positions, Pause Inter-
  782. rupt (/p#-), User Input (/i#).
  783.  
  784.      4.0  - 10/31/91  User Input  changed  to  modify environment  rather than
  785. create SW-ENV.BAT.  Removed limit on  Highlighting. Added custom window border
  786. (/l#char), Border  Message (/m#), Justify (/j#),  Outside Edge  color (/o#), 9
  787. Alert sounds  (/a#), Wide window edge  (/w), Foreground color  for screen (/k#
  788. /k#), Query  wildcard, default,  and Pause  timeout (/q*`  /p#-), Window  size
  789. control (/r# /r# /c# /c#).
  790.  
  791.      4.1 - 12/1/91  Enhanced User  Input. Pause, Query  and User Input  window
  792. changed  to popup  style. Added  Fill  String  (/k#string), Zoom  Window (/z),
  793. Input Line (/n#),  Uppercase Input (/u), Draw  Window to override  popup (/d),
  794. custom  environment  variables  (/i#var). New  Utility  added  to check  disks
  795. (DI.EXE).
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.                                    Page 14
  809.  
  810.